function [output_flag_vec] = HPZ_output_file_format
%% the following is specific information needed for output file format

    %% initializing output settings
    output_flag_vec = false(1, 5);
    
    % create the gui figure
    sz = [350 450]; % figure size
    screensize = get(0,'ScreenSize');
    xpos = ceil((screensize(3)-sz(2))/2); % center the figure on the
    ypos = ceil((screensize(4)-sz(1))/2); % center the figure on the
    S.fh = figure('units','pixels',...
                          'position',[xpos, ypos, sz(2), sz(1)],...
                          'menubar','none',...
                          'name','Output File Format',...
                          'numbertitle','off',...
                          'resize','off');

    %% Options
    S.bg_fs = uibuttongroup('units','pix',...
                         'title', 'Options', ...
                         'pos',[25 60 400 280]);
                     
    S.label_ffs(1) = uicontrol(S.bg_fs,...
                     'style','text',...
                     'units','pix',...
                     'position',[10 220 380 30],...
                     'fontsize',12,'fontweight','bold',... 
                     'string','From following options please select what would you ');

    S.label_ffs(2) = uicontrol(S.bg_fs,...
                     'style','text',...
                     'units','pix',...
                     'position',[10 200 250 30],...
                     'fontsize',12,'fontweight','bold',... 
                     'string','like to appear in the output file:');
                 
    S.file_setting_op(1) = uicontrol(S.bg_fs,...
                        'style','check',...
                        'unit','pix',...
                        'position',[30 170 350 30],...
                        'string',' NLLS Criterion based on CFGK Metric');
                    
    S.file_setting_op(2) = uicontrol(S.bg_fs,...
                        'style','check',...
                        'unit','pix',...
                        'position',[30 140 350 30],...
                        'string',' NLLS Criterion based on Euclidean Metric');

    S.file_setting_op(3) = uicontrol(S.bg_fs,...
                        'style','check',...
                        'unit','pix',...
                        'position',[30 110 350 30],...
                        'string',' MME Criterion based on MAX Waste');
                    
    S.file_setting_op(4) = uicontrol(S.bg_fs,...
                        'style','check',...
                        'unit','pix',...
                        'position',[30 80 350 30],...
                        'string',' MME Criterion based on MEAN Waste');
                    
    S.file_setting_op(5) = uicontrol(S.bg_fs,...
                        'style','check',...
                        'unit','pix',...
                        'position',[30 50 350 30],...
                        'string',' MME Criterion based on SSQ Wastes');

    %% end of settings

    S.pb = uicontrol('style','push',...
                     'unit','pix',...
                     'position',[170 15 100 30],...
                     'string','OK',...
                     'callback',{@pb_call,S});

    uiwait(S.fh)  % Prevent all other processes from starting until closed.
    
    %% OK button
    function [] = pb_call(varargin)
        % Callback for pushbutton.
        S = varargin{3};  % Get the structure.
        % Instead of switch, we could use num2str on:   
        % find(get(S.bg,'selectedobject')==S.rd)      (or similar)
        % Note the use of findobj.  This is because of a BUG in MATLAB, whereby if
        % the user selects the same button twice, the selectedobject property will
        % not work correctly.

        output_flag_vec = cell2mat(get(S.file_setting_op(:), 'value'));

        % close the window
        close(S.fh);

    end

end